//@auther foolbread
//@time 2016-03-08
//@file ApnsHttp2/log/log.go
package log

import (
	"github.com/cihub/seelog"
	"github.com/foolbread/fbcommon/golog"
)

func InitLog() {
	golog.Info("initing ApnsHttp2 log...")

	var err error
	g_logfile, err = seelog.LoggerFromConfigAsFile(log_path)
	if err != nil {
		golog.Critical(err)
	}
}

func LogFile() seelog.LoggerInterface {
	return g_logfile
}

func SetLogPath(str string) {
	log_path = str
}

var log_path string
var g_logfile seelog.LoggerInterface
